package com.amigo.online.provider.user.util;

import org.springframework.http.ResponseEntity;

import com.amigo.online.common.core.response.Response;

public class BasicResponseHandle {

    public static boolean convertListObject(ResponseEntity<Response> res) {
        if (res.getStatusCodeValue() != 200) {
            return false;
        }
        if (res.getBody() == null) {
            return false;
        }
        if (res.getBody().getMeta().getCode() != 200) {
            return false;
        }
        Object responseData = res.getBody().getData();
        if (responseData == null) {
            return false;
        }
        return true;
    }
}
